<?php

namespace App\Http\Controllers\Source\Rong360;

use App\Http\Controllers\Source\BaseController;
use App\Models\UserBankCard;
use App\Models\UserLoanRequest;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Service\Repay;
use Service\User;

class RepayController extends BaseController
{
    use User;
    use Repay;
    public function repayDetail(Request $request){
        //todo 调用还款详情服务


    }

    /**
     * @param Request $request
     * @return mixed
     * @author luwei
     * @date 2019-03-01 18:26
     */
    public function doRepay(Request $request){
        //todo 去还款

//        $data = $this->initData($request);
//
//        $bankCard = $this->getRepayBankCard($data['order_no']);
//        if(!$bankCard){
//            return r360fail('未查询到银行卡信息');
//        }
//        if($data['period_nos'] == 'all'){
//            $res = $this->repayAll($data['card_id']);
//        }elseif($data['period_nos'] == 2){
//            $res = $this->repayCurrent($data['card_id']);
//        }else{
//            return r360fail('请选择类型');
//        }
//        if($res['flag'] === false){
//            return r360fail($res['msg']);
//        }elseif($res['flag'] === true){
//            return r360Success($res['msg']);
//        }
    }

    public function repayPlan(Request $request){
        //todo 还款计划
    }
}
